// File: entity/NovelInfo.cpp
#include "novelinfo.h"

NovelInfo::NovelInfo(QObject *parent) : QObject(parent) {}

// Getter实现
QString NovelInfo::getId() const { return id;}
QString NovelInfo::getTitle() const { return title;}
QString NovelInfo::getAuthor() const { return author;}
QString NovelInfo::getCoverPath() const { return coverPath;}
QString NovelInfo::getDescription() const { return description;}
QString NovelInfo::getCategory() const { return category;}
QString NovelInfo::getTags() const { return tags;}
QString NovelInfo::getLanguage() const { return language;}
int NovelInfo::getStatus() const { return status;}
int NovelInfo::getChaptersCount() const { return chaptersCount;}
int NovelInfo::getWordCount() const { return wordCount;}
QString NovelInfo::getPublishTime() const { return publishTime;}
QString NovelInfo::getCreateTime() const { return createTime;}
QString NovelInfo::getUpdateTime() const { return updateTime;}
QString NovelInfo::getLastReadChapter() const { return lastReadChapter;}
int NovelInfo::getFileSize() const { return fileSize;}
int NovelInfo::getSourceType() const { return sourceType;}
QString NovelInfo::getSourceUrl() const { return sourceUrl;}
int NovelInfo::getLoadStatus() const { return loadStatus;}
double NovelInfo::getParseProgress() const { return parseProgress;}

// Setter实现
void NovelInfo::setId(const QString &m_id) { id = m_id; }
void NovelInfo::setTitle(const QString &m_title) { title = m_title; }
void NovelInfo::setAuthor(const QString &m_author) { author = m_author; }
void NovelInfo::setCoverPath(const QString &m_coverPath) { coverPath = m_coverPath; }
void NovelInfo::setDescription(const QString &m_description) { description = m_description; }
void NovelInfo::setCategory(const QString &m_category) { category = m_category; }
void NovelInfo::setTags(const QString &m_tags) { tags = m_tags; }
void NovelInfo::setLanguage(const QString &m_language) { language = m_language; }
void NovelInfo::setStatus(int m_status) { status = m_status; }
void NovelInfo::setChaptersCount(int m_chaptersCount) { chaptersCount = m_chaptersCount; }
void NovelInfo::setWordCount(int m_wordCount) { wordCount = m_wordCount; }
void NovelInfo::setPublishTime(const QString &m_publishTime) { publishTime = m_publishTime; }
void NovelInfo::setCreateTime(const QString &m_createTime) { createTime = m_createTime; }
void NovelInfo::setUpdateTime(const QString &m_updateTime) { updateTime = m_updateTime; }
void NovelInfo::setLastReadChapter(const QString &m_lastReadChapter) { lastReadChapter = m_lastReadChapter; }
void NovelInfo::setFileSize(int m_fileSize) { fileSize = m_fileSize; }
void NovelInfo::setSourceType(int m_sourceType) { sourceType = m_sourceType; }
void NovelInfo::setSourceUrl(const QString &m_sourceUrl) { sourceUrl = m_sourceUrl; }
void NovelInfo::setLoadStatus(int m_loadStatus) { loadStatus = m_loadStatus; }
void NovelInfo::setParseProgress(double m_parseProgress) { parseProgress = m_parseProgress; }


QString NovelInfo::toString() const {
    return QString("NovelInfo{")
        + "id='" + id + "', "
        + "title='" + title + "', "
        + "author='" + author + "', "
        + "coverPath='" + coverPath + "', "
        + "description='" + description + "', "
        + "category='" + category + "', "
        + "tags='" + tags + "', "
        + "language='" + language + "', "
        + "status=" + QString::number(status) + ", "
        + "chaptersCount=" + QString::number(chaptersCount) + ", "
        + "wordCount=" + QString::number(wordCount) + ", "
        + "publishTime='" + publishTime + "', "
        + "createTime='" + createTime + "', "
        + "updateTime='" + updateTime + "', "
        + "lastReadChapter='" + lastReadChapter + "', "
        + "fileSize=" + QString::number(fileSize) + ", "
        + "sourceType=" + QString::number(sourceType) + ", "
        + "sourceUrl='" + sourceUrl + "', "
        + "loadStatus=" + QString::number(loadStatus) + ", "
        + "parseProgress=" + QString::number(parseProgress) + "}";
}

